import moment from "moment";
import { Schema } from 'mongoose';
import { dbConfig } from '../../config/db';

const { tables } = dbConfig;
const { userRelation } = tables;

export const userRelationSchema = new Schema({
  userId: { 
    type: String,
    default: '',
  },
  fromUser: {
    type: String,
    default: '',
  },
  toUser: {
    type: String,
    default: '',
  },
  time: {
    type: String,
    default: moment().unix(),
  },
  status: {
    type: String,
    default: '',
  }
}, {
  collection: userRelation
})